
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>githook使用checkstyle · 继松的书</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="jisong">
        
        
    
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-prism/prism-base16-ateliersulphurpool.light.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-ace/ace.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-sectionx/sectionx.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../styles/website.css">
        
    
        
    
        
    
        
    
        
    
        
    


    

        
    
    
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="pre-commit.html" />
    
    
    <link rel="prev" href="checkstyle.xml.html" />
    

    
    <link rel="stylesheet" href="../../gitbook/gitbook-plugin-chart/c3/c3.min.css">
    <script src="../../gitbook/gitbook-plugin-chart/c3/d3.min.js"></script>
    <script src="../../gitbook/gitbook-plugin-chart/c3/c3.min.js"></script>
    

    <script src="../../gitbook/gitbook-plugin-graph/d3.min.js"></script>
    <script src="../../gitbook/gitbook-plugin-graph/function-plot.js"></script>    

    
        <link rel="shortcut icon" href='../../favicon.ico' type="image/x-icon">
    
    
        <link rel="bookmark" href='../../favicon.ico' type="image/x-icon">
    
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://ji-song.gitee.io/cc" target="_blank" class="custom-link">Home</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                        <b>1.1.</b>
                    
                    继松的笔记
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Developer</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../../Developer/Flink/0-README.html">
            
                <a href="../../Developer/Flink/0-README.html">
            
                    
                        <b>2.1.</b>
                    
                    Flink
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="../../Developer/Flink/or01-初学 Flink.html">
            
                <a href="../../Developer/Flink/or01-初学 Flink.html">
            
                    
                        <b>2.1.1.</b>
                    
                    初学 Flink
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="../../Developer/Flink/or02-Flink中Keyby和线程数的疑问.html">
            
                <a href="../../Developer/Flink/or02-Flink中Keyby和线程数的疑问.html">
            
                    
                        <b>2.1.2.</b>
                    
                    Flink中Keyby和线程数的疑问
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="../../Developer/Flink/or03-Flink-Spark-Storm的区别.html">
            
                <a href="../../Developer/Flink/or03-Flink-Spark-Storm的区别.html">
            
                    
                        <b>2.1.3.</b>
                    
                    Flink-Spark-Storm的区别
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.1.4" data-path="../../Developer/Flink/or04-Flink 异常笔记.html">
            
                <a href="../../Developer/Flink/or04-Flink 异常笔记.html">
            
                    
                        <b>2.1.4.</b>
                    
                    Flink 异常笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="../../Developer/JDK/0-README.html">
            
                <a href="../../Developer/JDK/0-README.html">
            
                    
                        <b>2.2.</b>
                    
                    JDK
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" data-path="../../Developer/JDK/Lock/0-README.html">
            
                <a href="../../Developer/JDK/Lock/0-README.html">
            
                    
                        <b>2.2.1.</b>
                    
                    Lock
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1.1" data-path="../../Developer/JDK/Lock/AQS.html">
            
                <a href="../../Developer/JDK/Lock/AQS.html">
            
                    
                        <b>2.2.1.1.</b>
                    
                    AQS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.2" data-path="../../Developer/JDK/Lock/LinkedBlockingQueue.html">
            
                <a href="../../Developer/JDK/Lock/LinkedBlockingQueue.html">
            
                    
                        <b>2.2.1.2.</b>
                    
                    LinkedBlockingQueue
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.3" data-path="../../Developer/JDK/Lock/ReadWriteLock.html">
            
                <a href="../../Developer/JDK/Lock/ReadWriteLock.html">
            
                    
                        <b>2.2.1.3.</b>
                    
                    ReadWriteLock
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.1.4" data-path="../../Developer/JDK/Lock/[12090055]ReentrantLock.html">
            
                <a href="../../Developer/JDK/Lock/[12090055]ReentrantLock.html">
            
                    
                        <b>2.2.1.4.</b>
                    
                    ReentrantLock
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.2" data-path="../../Developer/JDK/Period 时间坑.html">
            
                <a href="../../Developer/JDK/Period 时间坑.html">
            
                    
                        <b>2.2.2.</b>
                    
                    Period 时间坑
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3" data-path="../../Developer/JDK/Pool/0-README.html">
            
                <a href="../../Developer/JDK/Pool/0-README.html">
            
                    
                        <b>2.2.3.</b>
                    
                    Pool
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.3.1" data-path="../../Developer/JDK/Pool/ThreadPoolExecutor.html">
            
                <a href="../../Developer/JDK/Pool/ThreadPoolExecutor.html">
            
                    
                        <b>2.2.3.1.</b>
                    
                    ThreadPoolExecutor
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.3.2" data-path="../../Developer/JDK/Pool/多线程并发导致CPU100%的一种原因和解决方式.html">
            
                <a href="../../Developer/JDK/Pool/多线程并发导致CPU100%的一种原因和解决方式.html">
            
                    
                        <b>2.2.3.2.</b>
                    
                    多线程并发导致CPU100%的一种原因和解决方式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2.4" data-path="../../Developer/JDK/Proxy的工作原理[0%].html">
            
                <a href="../../Developer/JDK/Proxy的工作原理[0%].html">
            
                    
                        <b>2.2.4.</b>
                    
                    Proxy的工作原理[0%]
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2.5" data-path="../../Developer/JDK/Util/0-README.html">
            
                <a href="../../Developer/JDK/Util/0-README.html">
            
                    
                        <b>2.2.5.</b>
                    
                    Util
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.5.1" data-path="../../Developer/JDK/Util/HashMap.html">
            
                <a href="../../Developer/JDK/Util/HashMap.html">
            
                    
                        <b>2.2.5.1.</b>
                    
                    HashMap
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="../../Developer/JVM/0-README.html">
            
                <a href="../../Developer/JVM/0-README.html">
            
                    
                        <b>2.3.</b>
                    
                    JVM
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.3.1" data-path="../../Developer/JVM/or01-内存区域.html">
            
                <a href="../../Developer/JVM/or01-内存区域.html">
            
                    
                        <b>2.3.1.</b>
                    
                    内存区域
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.2" data-path="../../Developer/JVM/or02-内存模型.html">
            
                <a href="../../Developer/JVM/or02-内存模型.html">
            
                    
                        <b>2.3.2.</b>
                    
                    内存模型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.3" data-path="../../Developer/JVM/or03-内存优化.html">
            
                <a href="../../Developer/JVM/or03-内存优化.html">
            
                    
                        <b>2.3.3.</b>
                    
                    内存优化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.4" data-path="../../Developer/JVM/or04-JVM参数集.html">
            
                <a href="../../Developer/JVM/or04-JVM参数集.html">
            
                    
                        <b>2.3.4.</b>
                    
                    JVM参数集
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.5" data-path="../../Developer/JVM/or05-JVM指令集.html">
            
                <a href="../../Developer/JVM/or05-JVM指令集.html">
            
                    
                        <b>2.3.5.</b>
                    
                    JVM指令集
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.6" data-path="../../Developer/JVM/or06-垃圾收集器.html">
            
                <a href="../../Developer/JVM/or06-垃圾收集器.html">
            
                    
                        <b>2.3.6.</b>
                    
                    垃圾收集器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.7" data-path="../../Developer/JVM/or07-垃圾收集器优化.html">
            
                <a href="../../Developer/JVM/or07-垃圾收集器优化.html">
            
                    
                        <b>2.3.7.</b>
                    
                    垃圾收集器优化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.8" data-path="../../Developer/JVM/or08-Arthus.html">
            
                <a href="../../Developer/JVM/or08-Arthus.html">
            
                    
                        <b>2.3.8.</b>
                    
                    Arthus
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3.9" data-path="../../Developer/JVM/or09-Sychronized.html">
            
                <a href="../../Developer/JVM/or09-Sychronized.html">
            
                    
                        <b>2.3.9.</b>
                    
                    Sychronized
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="../../Developer/Kafka/0-README.html">
            
                <a href="../../Developer/Kafka/0-README.html">
            
                    
                        <b>2.4.</b>
                    
                    Kafka
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.4.1" data-path="../../Developer/Kafka/Kafka高吞吐量的原理[0%].html">
            
                <a href="../../Developer/Kafka/Kafka高吞吐量的原理[0%].html">
            
                    
                        <b>2.4.1.</b>
                    
                    Kafka高吞吐量的原理[0%]
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.2" data-path="../../Developer/Kafka/kafka的消费时机.html">
            
                <a href="../../Developer/Kafka/kafka的消费时机.html">
            
                    
                        <b>2.4.2.</b>
                    
                    kafka的消费时机
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.3" data-path="../../Developer/Kafka/参数详解[1%].html">
            
                <a href="../../Developer/Kafka/参数详解[1%].html">
            
                    
                        <b>2.4.3.</b>
                    
                    参数详解[1%]
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4.4" data-path="../../Developer/Kafka/问题点[1%].html">
            
                <a href="../../Developer/Kafka/问题点[1%].html">
            
                    
                        <b>2.4.4.</b>
                    
                    问题点[1%]
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="../../Developer/MySQL/0-README.html">
            
                <a href="../../Developer/MySQL/0-README.html">
            
                    
                        <b>2.5.</b>
                    
                    MySQL
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.1" data-path="../../Developer/MySQL/B树.html">
            
                <a href="../../Developer/MySQL/B树.html">
            
                    
                        <b>2.5.1.</b>
                    
                    B树
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.2" data-path="../../Developer/MySQL/MySQL 处理重复数据.html">
            
                <a href="../../Developer/MySQL/MySQL 处理重复数据.html">
            
                    
                        <b>2.5.2.</b>
                    
                    MySQL 处理重复数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.3" data-path="../../Developer/MySQL/MySQL常用命令.html">
            
                <a href="../../Developer/MySQL/MySQL常用命令.html">
            
                    
                        <b>2.5.3.</b>
                    
                    MySQL常用命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.4" data-path="../../Developer/MySQL/MySQL数据类型.html">
            
                <a href="../../Developer/MySQL/MySQL数据类型.html">
            
                    
                        <b>2.5.4.</b>
                    
                    MySQL数据类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.5" data-path="../../Developer/MySQL/explain.html">
            
                <a href="../../Developer/MySQL/explain.html">
            
                    
                        <b>2.5.5.</b>
                    
                    explain
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5.6" data-path="../../Developer/MySQL/写SQL的注意点.html">
            
                <a href="../../Developer/MySQL/写SQL的注意点.html">
            
                    
                        <b>2.5.6.</b>
                    
                    写SQL的注意点
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="../../Developer/Python/0-README.html">
            
                <a href="../../Developer/Python/0-README.html">
            
                    
                        <b>2.6.</b>
                    
                    Python
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="../../Developer/Redis/0-README.html">
            
                <a href="../../Developer/Redis/0-README.html">
            
                    
                        <b>2.7.</b>
                    
                    Redis
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.7.1" data-path="../../Developer/Redis/Jedis常见问题汇总.html">
            
                <a href="../../Developer/Redis/Jedis常见问题汇总.html">
            
                    
                        <b>2.7.1.</b>
                    
                    Jedis常见问题汇总
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.7.2" data-path="../../Developer/Redis/Redis info详解.html">
            
                <a href="../../Developer/Redis/Redis info详解.html">
            
                    
                        <b>2.7.2.</b>
                    
                    Redis info详解
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="../../Developer/Spring/0-README.html">
            
                <a href="../../Developer/Spring/0-README.html">
            
                    
                        <b>2.8.</b>
                    
                    Spring
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.8.1" data-path="../../Developer/Spring/Spring AOP详解[0%].html">
            
                <a href="../../Developer/Spring/Spring AOP详解[0%].html">
            
                    
                        <b>2.8.1.</b>
                    
                    Spring AOP详解[0%]
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.8.2" data-path="../../Developer/Spring/Spring 容器里都装了哪些bean.html">
            
                <a href="../../Developer/Spring/Spring 容器里都装了哪些bean.html">
            
                    
                        <b>2.8.2.</b>
                    
                    Spring 容器里都装了哪些bean
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.8.3" data-path="../../Developer/Spring/[11770408]Spring-Cache手动清缓存.html">
            
                <a href="../../Developer/Spring/[11770408]Spring-Cache手动清缓存.html">
            
                    
                        <b>2.8.3.</b>
                    
                    Spring-Cache手动清缓存
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="../../Developer/kotlin/0-README.html">
            
                <a href="../../Developer/kotlin/0-README.html">
            
                    
                        <b>2.9.</b>
                    
                    kotlin
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="../../Developer/工作心得/0-README.html">
            
                <a href="../../Developer/工作心得/0-README.html">
            
                    
                        <b>2.10.</b>
                    
                    工作心得
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.10.1" data-path="../../Developer/工作心得/HttpClient高并发下性能优化-http连接池.html">
            
                <a href="../../Developer/工作心得/HttpClient高并发下性能优化-http连接池.html">
            
                    
                        <b>2.10.1.</b>
                    
                    HttpClient高并发下性能优化-http连接池
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.2" data-path="../../Developer/工作心得/List 快速去重.html">
            
                <a href="../../Developer/工作心得/List 快速去重.html">
            
                    
                        <b>2.10.2.</b>
                    
                    List 快速去重
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.3" data-path="../../Developer/工作心得/MAVEN依赖问题.html">
            
                <a href="../../Developer/工作心得/MAVEN依赖问题.html">
            
                    
                        <b>2.10.3.</b>
                    
                    MAVEN依赖问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.4" data-path="../../Developer/工作心得/MyBatis使用JDK8的日期类Handler.html">
            
                <a href="../../Developer/工作心得/MyBatis使用JDK8的日期类Handler.html">
            
                    
                        <b>2.10.4.</b>
                    
                    MyBatis使用JDK8的日期类Handler
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.5" data-path="../../Developer/工作心得/Mybatis缓存笔记.html">
            
                <a href="../../Developer/工作心得/Mybatis缓存笔记.html">
            
                    
                        <b>2.10.5.</b>
                    
                    Mybatis缓存笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.6" data-path="../../Developer/工作心得/Mybatis配置详解.html">
            
                <a href="../../Developer/工作心得/Mybatis配置详解.html">
            
                    
                        <b>2.10.6.</b>
                    
                    Mybatis配置详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.7" data-path="../../Developer/工作心得/log4j动态修改日志级别.html">
            
                <a href="../../Developer/工作心得/log4j动态修改日志级别.html">
            
                    
                        <b>2.10.7.</b>
                    
                    log4j动态修改日志级别
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.8" data-path="../../Developer/工作心得/收藏的文章.html">
            
                <a href="../../Developer/工作心得/收藏的文章.html">
            
                    
                        <b>2.10.8.</b>
                    
                    收藏的文章
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.9" data-path="../../Developer/工作心得/数据不一致问题.html">
            
                <a href="../../Developer/工作心得/数据不一致问题.html">
            
                    
                        <b>2.10.9.</b>
                    
                    数据不一致问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.10.10" data-path="../../Developer/工作心得/站会制度.html">
            
                <a href="../../Developer/工作心得/站会制度.html">
            
                    
                        <b>2.10.10.</b>
                    
                    站会制度
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.11" data-path="../../Developer/微服务/0-README.html">
            
                <a href="../../Developer/微服务/0-README.html">
            
                    
                        <b>2.11.</b>
                    
                    微服务
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.11.1" data-path="../../Developer/微服务/dubbo-注入spring为空.html">
            
                <a href="../../Developer/微服务/dubbo-注入spring为空.html">
            
                    
                        <b>2.11.1.</b>
                    
                    dubbo-注入spring为空
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.11.2" data-path="../../Developer/微服务/dubbo在zk中都存了哪些东西[10%].html">
            
                <a href="../../Developer/微服务/dubbo在zk中都存了哪些东西[10%].html">
            
                    
                        <b>2.11.2.</b>
                    
                    dubbo在zk中都存了哪些东西[10%]
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.11.3" data-path="../../Developer/微服务/zookeeper命令[1%].html">
            
                <a href="../../Developer/微服务/zookeeper命令[1%].html">
            
                    
                        <b>2.11.3.</b>
                    
                    zookeeper命令[1%]
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">OS</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../../OS/Linux/0-README.html">
            
                <a href="../../OS/Linux/0-README.html">
            
                    
                        <b>3.1.</b>
                    
                    Linux
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1.1" data-path="../../OS/Linux/Deepin Linux安装wine5.0.html">
            
                <a href="../../OS/Linux/Deepin Linux安装wine5.0.html">
            
                    
                        <b>3.1.1.</b>
                    
                    Deepin Linux安装wine5.0
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.2" data-path="../../OS/Linux/Deepin修改使用aliyun的软件源.html">
            
                <a href="../../OS/Linux/Deepin修改使用aliyun的软件源.html">
            
                    
                        <b>3.1.2.</b>
                    
                    Deepin修改使用aliyun的软件源
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.3" data-path="../../OS/Linux/Linux最常用命令.html">
            
                <a href="../../OS/Linux/Linux最常用命令.html">
            
                    
                        <b>3.1.3.</b>
                    
                    Linux最常用命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.4" data-path="../../OS/Linux/TOP命令.html">
            
                <a href="../../OS/Linux/TOP命令.html">
            
                    
                        <b>3.1.4.</b>
                    
                    TOP命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.5" data-path="../../OS/Linux/bash_alias.html">
            
                <a href="../../OS/Linux/bash_alias.html">
            
                    
                        <b>3.1.5.</b>
                    
                    bash_alias
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.6" data-path="../../OS/Linux/dpkg.html">
            
                <a href="../../OS/Linux/dpkg.html">
            
                    
                        <b>3.1.6.</b>
                    
                    dpkg
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.7" data-path="../../OS/Linux/find.html">
            
                <a href="../../OS/Linux/find.html">
            
                    
                        <b>3.1.7.</b>
                    
                    find
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.1.8" data-path="../../OS/Linux/oh-my-zsh.html">
            
                <a href="../../OS/Linux/oh-my-zsh.html">
            
                    
                        <b>3.1.8.</b>
                    
                    oh-my-zsh
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="../../OS/Mac/0-README.html">
            
                <a href="../../OS/Mac/0-README.html">
            
                    
                        <b>3.2.</b>
                    
                    Mac
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.2.1" data-path="../../OS/Mac/MacBook安装brew.html">
            
                <a href="../../OS/Mac/MacBook安装brew.html">
            
                    
                        <b>3.2.1.</b>
                    
                    MacBook安装brew
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="../../OS/Windows/0-README.html">
            
                <a href="../../OS/Windows/0-README.html">
            
                    
                        <b>3.3.</b>
                    
                    Windows
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.3.1" data-path="../../OS/Windows/WSL的ssh-agent问题.html">
            
                <a href="../../OS/Windows/WSL的ssh-agent问题.html">
            
                    
                        <b>3.3.1.</b>
                    
                    WSL的ssh-agent问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3.2" data-path="../../OS/Windows/windows10使用任务计划提醒自己.html">
            
                <a href="../../OS/Windows/windows10使用任务计划提醒自己.html">
            
                    
                        <b>3.3.2.</b>
                    
                    windows10使用任务计划提醒自己
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3.3" data-path="../../OS/Windows/win下的终端使用指南.html">
            
                <a href="../../OS/Windows/win下的终端使用指南.html">
            
                    
                        <b>3.3.3.</b>
                    
                    win下的终端使用指南
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">TOOLS</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="../IDEA/0-README.html">
            
                <a href="../IDEA/0-README.html">
            
                    
                        <b>4.1.</b>
                    
                    IDEA
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1.1" data-path="../IDEA/IDEA配置终端.html">
            
                <a href="../IDEA/IDEA配置终端.html">
            
                    
                        <b>4.1.1.</b>
                    
                    IDEA配置终端
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.2" data-path="../IDEA/去掉重复代码的提醒.html">
            
                <a href="../IDEA/去掉重复代码的提醒.html">
            
                    
                        <b>4.1.2.</b>
                    
                    去掉重复代码的提醒
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.3" data-path="../IDEA/字体JetBrain mono.html">
            
                <a href="../IDEA/字体JetBrain mono.html">
            
                    
                        <b>4.1.3.</b>
                    
                    字体JetBrain mono
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.4" data-path="../IDEA/常用插件.html">
            
                <a href="../IDEA/常用插件.html">
            
                    
                        <b>4.1.4.</b>
                    
                    常用插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.1.5" data-path="../IDEA/自定义TODO.html">
            
                <a href="../IDEA/自定义TODO.html">
            
                    
                        <b>4.1.5.</b>
                    
                    自定义TODO
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="0-README.html">
            
                <a href="0-README.html">
            
                    
                        <b>4.2.</b>
                    
                    checkstyle
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.2.1" data-path="checkstyle.xml.html">
            
                <a href="checkstyle.xml.html">
            
                    
                        <b>4.2.1.</b>
                    
                    checkstyle.xml
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="4.2.2" data-path="githook使用checkstyle.html">
            
                <a href="githook使用checkstyle.html">
            
                    
                        <b>4.2.2.</b>
                    
                    githook使用checkstyle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2.3" data-path="pre-commit.html">
            
                <a href="pre-commit.html">
            
                    
                        <b>4.2.3.</b>
                    
                    pre-commit
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="../docker/0-README.html">
            
                <a href="../docker/0-README.html">
            
                    
                        <b>4.3.</b>
                    
                    docker
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.3.1" data-path="../docker/Docker 常用命令.html">
            
                <a href="../docker/Docker 常用命令.html">
            
                    
                        <b>4.3.1.</b>
                    
                    Docker 常用命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.2" data-path="../docker/deepin中安装docker.html">
            
                <a href="../docker/deepin中安装docker.html">
            
                    
                        <b>4.3.2.</b>
                    
                    deepin中安装docker
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.3" data-path="../docker/docker-compose安装.html">
            
                <a href="../docker/docker-compose安装.html">
            
                    
                        <b>4.3.3.</b>
                    
                    docker-compose安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.4" data-path="../docker/docker-compose简化docker命令.html">
            
                <a href="../docker/docker-compose简化docker命令.html">
            
                    
                        <b>4.3.4.</b>
                    
                    docker-compose简化docker命令
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="../git/0-README.html">
            
                <a href="../git/0-README.html">
            
                    
                        <b>4.4.</b>
                    
                    git
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.4.1" data-path="../git/[11769588]git配置多仓库.html">
            
                <a href="../git/[11769588]git配置多仓库.html">
            
                    
                        <b>4.4.1.</b>
                    
                    git配置多仓库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4.2" data-path="../git/各GIt仓库的api.html">
            
                <a href="../git/各GIt仓库的api.html">
            
                    
                        <b>4.4.2.</b>
                    
                    各GIt仓库的api
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="../ssh/0-README.html">
            
                <a href="../ssh/0-README.html">
            
                    
                        <b>4.5.</b>
                    
                    ssh
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.5.1" data-path="../ssh/ssh配置公钥私钥登录服务器.html">
            
                <a href="../ssh/ssh配置公钥私钥登录服务器.html">
            
                    
                        <b>4.5.1.</b>
                    
                    ssh配置公钥私钥登录服务器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.5.2" data-path="../ssh/ssh配置跳板机-带密钥.html">
            
                <a href="../ssh/ssh配置跳板机-带密钥.html">
            
                    
                        <b>4.5.2.</b>
                    
                    ssh配置跳板机-带密钥
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="../sublime/0-README.html">
            
                <a href="../sublime/0-README.html">
            
                    
                        <b>4.6.</b>
                    
                    sublime
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.6.1" data-path="../sublime/sublime使用笔记.html">
            
                <a href="../sublime/sublime使用笔记.html">
            
                    
                        <b>4.6.1.</b>
                    
                    sublime使用笔记
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.6.2" data-path="../sublime/sublime替换本地记事本.html">
            
                <a href="../sublime/sublime替换本地记事本.html">
            
                    
                        <b>4.6.2.</b>
                    
                    sublime替换本地记事本
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.6.3" data-path="../sublime/去掉升级提醒.html">
            
                <a href="../sublime/去掉升级提醒.html">
            
                    
                        <b>4.6.3.</b>
                    
                    去掉升级提醒
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.7" >
            
                <span>
            
                    
                        <b>4.7.</b>
                    
                    Spring
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="4.8" >
            
                <span>
            
                    
                        <b>4.8.</b>
                    
                    cglib
            
                </span>
            

            
        </li>
    

    
        
        <li class="header">前端</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../../前端/blog/0-README.html">
            
                <a href="../../前端/blog/0-README.html">
            
                    
                        <b>5.1.</b>
                    
                    blog
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="../../前端/chrome/0-README.html">
            
                <a href="../../前端/chrome/0-README.html">
            
                    
                        <b>5.2.</b>
                    
                    chrome
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.2.1" data-path="../../前端/chrome/or01-扩展插件开发.html">
            
                <a href="../../前端/chrome/or01-扩展插件开发.html">
            
                    
                        <b>5.2.1.</b>
                    
                    扩展插件开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2.2" data-path="../../前端/chrome/or02-禁用chrome的快捷键.html">
            
                <a href="../../前端/chrome/or02-禁用chrome的快捷键.html">
            
                    
                        <b>5.2.2.</b>
                    
                    禁用chrome的快捷键
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2.3" data-path="../../前端/chrome/or03-小工具插件.html">
            
                <a href="../../前端/chrome/or03-小工具插件.html">
            
                    
                        <b>5.2.3.</b>
                    
                    小工具插件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="../../前端/gitbook/0-README.html">
            
                <a href="../../前端/gitbook/0-README.html">
            
                    
                        <b>5.3.</b>
                    
                    gitbook
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">小记</li>
        
        
    
        <li class="chapter " data-level="6.1" data-path="../../小记/游戏/0-README.html">
            
                <a href="../../小记/游戏/0-README.html">
            
                    
                        <b>6.1.</b>
                    
                    游戏
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1.1" data-path="../../小记/游戏/[12090043]重新机兵回归(MMR">
            
                <span>
            
                    
                        <b>6.1.1.</b>
                    
                    重新机兵回归(MMR)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.1.2" data-path="../../小记/游戏/上古卷轴5.html">
            
                <a href="../../小记/游戏/上古卷轴5.html">
            
                    
                        <b>6.1.2.</b>
                    
                    上古卷轴5
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="../../小记/电影/0-README.html">
            
                <a href="../../小记/电影/0-README.html">
            
                    
                        <b>6.2.</b>
                    
                    电影
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.2.1" data-path="../../小记/电影/动画电影-和谐.html">
            
                <a href="../../小记/电影/动画电影-和谐.html">
            
                    
                        <b>6.2.1.</b>
                    
                    动画电影-和谐
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.2.2" data-path="../../小记/电影/哈利波特.html">
            
                <a href="../../小记/电影/哈利波特.html">
            
                    
                        <b>6.2.2.</b>
                    
                    哈利波特
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.2.3" data-path="../../小记/电影/永无止镜.html">
            
                <a href="../../小记/电影/永无止镜.html">
            
                    
                        <b>6.2.3.</b>
                    
                    永无止镜
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.2.4" data-path="../../小记/电影/黑客帝国.html">
            
                <a href="../../小记/电影/黑客帝国.html">
            
                    
                        <b>6.2.4.</b>
                    
                    黑客帝国
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="../../小记/目标/0-README.html">
            
                <a href="../../小记/目标/0-README.html">
            
                    
                        <b>6.3.</b>
                    
                    目标
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.3.1" data-path="../../小记/目标/淘宝店.html">
            
                <a href="../../小记/目标/淘宝店.html">
            
                    
                        <b>6.3.1.</b>
                    
                    淘宝店
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="../../小记/眼球震颤/0-README.html">
            
                <a href="../../小记/眼球震颤/0-README.html">
            
                    
                        <b>6.4.</b>
                    
                    眼球震颤
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >githook使用checkstyle</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x8BF4;&#x660E;"><a name="&#x8BF4;&#x660E;" class="anchor-navigation-ex-anchor" href="#&#x8BF4;&#x660E;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x8BF4;&#x660E;</h2>
<p>&#x4EE3;&#x7801;&#x68C0;&#x67E5; , &#x540C;&#x65F6;&#x4E5F;&#x53EF;&#x4EE5;&#x8BB0;&#x5F55;&#x4E00;&#x4E9B;&#x89C4;&#x5219;.</p>
<p>&#x6DFB;&#x52A0;&#x4E86;&#x4E00;&#x4E2A;<code>git commit</code> &#x7684;&#x94A9;&#x5B50; . </p>
<p>&#x5728; <code>commit</code> &#x4EE3;&#x7801;&#x65F6; , &#x4F1A;&#x5BF9;&#x66F4;&#x6539;&#x7684; java &#x4EE3;&#x7801;&#x8FDB;&#x884C;&#x6587;&#x4EF6;&#x68C0;&#x67E5;.</p>
<p>&#x68C0;&#x67E5;&#x7684;&#x89C4;&#x5219;&#x5B9A;&#x4E49;&#x5728; <code>checkstyle.xml</code> &#x4E2D; .</p>
<p><code>checkstyle</code>&#x7684;&#x4F7F;&#x7528;&#x59FF;&#x52BF;:</p>
<ul>
<li>idea plugin</li>
</ul>
<p>&#x7F16;&#x8F91;&#x5668;&#x7684;&#x63D2;&#x4EF6;&#x65B9;&#x5F0F;, &#x9700;&#x8981;&#x624B;&#x52A8;&#x89E6;&#x53D1; , &#x5BF9;&#x9879;&#x76EE;&#x6216;&#x5355;&#x6587;&#x4EF6;&#x89E6;&#x53D1;&#x68C0;&#x67E5;. &#x7565;&#x9EBB;&#x70E6;</p>
<ul>
<li>maven plugin</li>
</ul>
<p>&#x4F7F;&#x7528;<code>maven</code>&#x547D;&#x4EE4; , &#x5BF9;&#x9879;&#x76EE;&#x6574;&#x4F53;&#x89E6;&#x53D1;&#x68C0;&#x67E5;. &#x9700;&#x8981;&#x624B;&#x52A8;&#x89E6;&#x53D1; , &#x8017;&#x65F6;&#x4E45; , &#x7565;&#x9EBB;&#x70E6;. </p>
<ul>
<li>git hook</li>
</ul>
<p>&#x501F;&#x52A9;git&#x7684;&#x94A9;&#x5B50;, &#x5728;&#x63D0;&#x4EA4;&#x4EE3;&#x7801;&#x65F6; , &#x5BF9;&#x4FEE;&#x6539;&#x7684;&#x4EE3;&#x7801;&#x68C0;&#x67E5; , &#x81EA;&#x52A8;&#x89E3;&#x51B3; , &#x6539;&#x591A;&#x5C11;&#x68C0;&#x67E5;&#x591A;&#x5C11;. &#x76EE;&#x524D;&#x6765;&#x770B;&#x662F;&#x6BD4;&#x8F83;&#x65B9;&#x4FBF;.</p>
<h2 id="&#x4F7F;&#x7528;"><a name="&#x4F7F;&#x7528;" class="anchor-navigation-ex-anchor" href="#&#x4F7F;&#x7528;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4F7F;&#x7528;</h2>
<p>&#x5C06; <code>checkstyle/pre-commit</code> , &#x590D;&#x5236;&#x5230; <code>.git/hooks/</code></p>
<pre class="language-"><code>cp ./checkstyle/pre-commit ./.git/hooks/
</code></pre><h2 id="&#x68C0;&#x67E5;&#x89C4;&#x5219;"><a name="&#x68C0;&#x67E5;&#x89C4;&#x5219;" class="anchor-navigation-ex-anchor" href="#&#x68C0;&#x67E5;&#x89C4;&#x5219;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x68C0;&#x67E5;&#x89C4;&#x5219;</h2>
<p><a href="https://checkstyle.org/checks.html" target="_blank">&#x5B98;&#x7F51;&#x89C4;&#x5219;</a> &#x6709;&#x5B9A;&#x4E49;&#x4E86;&#x5F88;&#x591A;&#x7684;&#x89C4;&#x5219;. &#x4E5F;&#x53EF;&#x4EE5;&#x81EA;&#x5B9A;&#x4E49;&#x89C4;&#x5219;.</p>
<p>&#x9664;&#x4E86;&#x5176;&#x4ED6;&#x516C;&#x5171;&#x89C4;&#x5219; , &#x5F53;&#x524D;&#x52A0;&#x4E86;&#x4E24;&#x4E2A;&#x81EA;&#x5B9A;&#x4E49;&#x89C4;&#x5219;:</p>
<ul>
<li>&#x7981;&#x7528; &apos;/api/ipapi&apos;&#x505A;&#x4E3A;&#x63A5;&#x53E3;&#x8DEF;&#x5F84;,&#x8FD9;&#x662F;&#x5386;&#x53F2;&#x8DEF;&#x5F84;,&#x4E0D;&#x518D;&#x517C;&#x5BB9;</li>
<li>&#x4E0D;&#x8981;&#x76F4;&#x63A5;&#x4F7F;&#x7528;device&#x5305;&#x7684;dao&#x63A5;&#x53E3;, &#x6B63;&#x5728;&#x9010;&#x6B65;&#x53BB;&#x6389;device&#x4F9D;&#x8D56;</li>
</ul>
<p>&#x5F02;&#x5E38;&#x7B49;&#x7EA7;, &#x5F53;&#x524D;&#x5B9A;&#x4E49;&#x4E24;&#x79CD;: </p>
<ul>
<li>warning  , &#x63D0;&#x9192;&#x4E0D;&#x5408;&#x89C4;&#x7684;&#x4EE3;&#x7801;. &#x6700;&#x597D;&#x4FEE;&#x6539;&#x6389;.</li>
<li>error , &#x4E00;&#x5B9A;&#x8981;&#x4FEE;&#x6539;&#x7684;&#x4EE3;&#x7801;. &#x98CE;&#x9669;&#x9AD8;</li>
</ul>
<p>&#x5F53;&#x68C0;&#x67E5;&#x5230;<code>error</code>&#x7EA7;&#x522B;&#x7684;&#x4EE3;&#x7801;, &#x4F1A;&#x963B;&#x6B62;&#x63D0;&#x4EA4;&#x4EE3;&#x7801;, &#x4FEE;&#x6539;&#x7B26;&#x5408;&#x89C4;&#x5219;&#x540E;&#x624D;&#x53EF;&#x4EE5;&#x63D0;&#x4EA4;.</p>
<h2 id="&#x68C0;&#x67E5;&#x7ED3;&#x679C;&#x8F93;&#x51FA;"><a name="&#x68C0;&#x67E5;&#x7ED3;&#x679C;&#x8F93;&#x51FA;" class="anchor-navigation-ex-anchor" href="#&#x68C0;&#x67E5;&#x7ED3;&#x679C;&#x8F93;&#x51FA;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x68C0;&#x67E5;&#x7ED3;&#x679C;&#x8F93;&#x51FA;</h2>
<p>&#x5728;&#x6267;&#x884C; <code>git commit</code> &#x65F6; , &#x4F1A;&#x5C06;&#x68C0;&#x67E5;&#x7684;&#x6267;&#x884C;&#x7ED3;&#x679C; ,&#x8F93;&#x51FA;&#x5230;<code>checkstyle_output.txt</code>&#x6587;&#x4EF6;&#x4E2D; .</p>
<p><code>checkstyle_output.txt</code> &#x4F1A;&#x88AB;<code>git</code>&#x5FFD;&#x7565;&#x6389; , &#x81EA;&#x5DF1;&#x68C0;&#x67E5;&#x5B8C; , &#x81EA;&#x5DF1;&#x770B;  , &#x81EA;&#x5DF1;&#x6539;.</p>
<pre class="language-"><code>&gt; &#x63D0;&#x4EA4;&#x4EE3;&#x7801;&#x8BF7;&#x786E;&#x4FDD;&#x5DF2;&#x7ECF;&#x7F16;&#x8BD1;&#x901A;&#x8FC7;
&gt; &#x5F53;&#x524D;&#x5DE5;&#x4F5C;&#x76EE;&#x5F55;&#xFF1A;/e/path/dir
&gt; &#x68C0;&#x67E5;&#x6587;&#x4EF6;&#xFF1A;......ServiceImpl.java
&gt;
&gt; &#x9519;&#x8BEF;&#x6570;: 0, &#x8B66;&#x544A;&#x6570;: 3
&gt;
&gt; &#x68C0;&#x67E5;&#x7ED3;&#x675F; , Good Luck !
</code></pre><p><code>checkstyle_output.txt</code> &#x6587;&#x4EF6;:</p>
<pre class="language-"><code>&#x5F00;&#x59CB;&#x68C0;&#x67E5;&#x2026;&#x2026;
[WARN] ......ServiceImpl.java:172: Switch &#x5757;&#x672A;&#x5B9A;&#x4E49; default &#x3002; [MissingSwitchDefault]
[WARN] ......ServiceImpl.java:434:17: &#x81F3;&#x591A;1&#x5C42; if&#xFF0C;&#x76EE;&#x524D;2&#x5C42;&#x3002; [NestedIfDepth]
[WARN] ......ServiceImpl.java:437:17: &#x81F3;&#x591A;1&#x5C42; if&#xFF0C;&#x76EE;&#x524D;2&#x5C42;&#x3002; [NestedIfDepth]
&#x68C0;&#x67E5;&#x5B8C;&#x6210;&#x3002;
</code></pre><h2 id="checkstylexml"><a name="checkstylexml" class="anchor-navigation-ex-anchor" href="#checkstylexml"><i class="fa fa-link" aria-hidden="true"></i></a>checkstyle.xml</h2>
<pre class="language-"><code><span class="token prolog">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
<span class="token doctype">&lt;!DOCTYPE module PUBLIC
        &quot;-//Checkstyle//DTD Checkstyle Configuration 1.3//EN&quot;
        &quot;https://checkstyle.org/dtds/configuration_1_3.dtd&quot;&gt;</span>

<span class="token comment">&lt;!--
    Checkstyle configuration that checks the Google coding conventions from Google Java Style
    that can be found at https://google.github.io/styleguide/javaguide.html
    Checkstyle is very configurable. Be sure to read the documentation at
    http://checkstyle.sf.net (or in your downloaded distribution).
    To completely disable a check, just comment it out or delete it from the file.
    Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
 --&gt;</span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span> <span class="token attr-value"><span class="token punctuation">=</span> <span class="token punctuation">&quot;</span>Checker<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>charset<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>UTF-8<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>

    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>severity<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>warning<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>

    <span class="token comment">&lt;!--&lt;module name=&quot;LineLength&quot;&gt;--&gt;</span>
        <span class="token comment">&lt;!--&lt;property name=&quot;severity&quot; value=&quot;error&quot;/&gt;--&gt;</span>
        <span class="token comment">&lt;!--&lt;property name=&quot;fileExtensions&quot; value=&quot;java&quot;/&gt;--&gt;</span>
        <span class="token comment">&lt;!--&lt;property name=&quot;max&quot; value=&quot;100&quot;/&gt;--&gt;</span>
        <span class="token comment">&lt;!--&lt;property name=&quot;ignorePattern&quot; value=&quot;^package.*|^import.*|a href|href|http://|https://|ftp://&quot;/&gt;--&gt;</span>
    <span class="token comment">&lt;!--&lt;/module&gt;--&gt;</span>

    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>TreeWalker<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>

        <span class="token comment">&lt;!-- ==============  &#x2193;  ERROR ,&#x4F1A;&#x7981;&#x6B62;&#x63D0;&#x4EA4;&#x4EE3;&#x7801;  &#x2193; ======================--&gt;</span>
        <span class="token comment">&lt;!-- &#x68C0;&#x67E5;equals()&#x6BD4;&#x8F83;&#x65B9;&#x6CD5;&#x4E2D;&#xFF0C;&#x4EFB;&#x610F;&#x7EC4;&#x5408;&#x7684;String&#x5E38;&#x91CF;&#x662F;&#x5426;&#x4F4D;&#x4E8E;&#x5DE6;&#x8FB9;&#x3002; --&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>EqualsAvoidNull<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>module</span><span class="token punctuation">&gt;</span></span>
        <span class="token comment">&lt;!-- &#x68C0;&#x67E5;&#x8986;&#x76D6;&#x4E86;equals()&#x65B9;&#x6CD5;&#x7684;&#x7C7B;&#x662F;&#x5426;&#x4E5F;&#x8986;&#x76D6;&#x4E86;hashCode()&#x65B9;&#x6CD5;&#x3002;
                      &#x89E3;&#x91CA;&#xFF1A;equals()&#x65B9;&#x6CD5;&#x548C;hashCode()&#x65B9;&#x6CD5;&#x7EA6;&#x5B9A;&#xFF0C;&#x76F8;&#x7B49;&#x7684;&#x5BF9;&#x8C61;&#x5FC5;&#x7136;&#x5177;&#x6709;&#x76F8;&#x540C;&#x7684;&#x54C8;&#x5E0C;&#x7801;&#x3002;&#x56E0;&#x6B64;&#xFF0C;&#x53EA;&#x8981;&#x4F60;&#x8986;&#x76D6;&#x4E86;equals()&#x65B9;&#x6CD5;&#xFF0C;&#x4F60;&#x5C31;&#x5FC5;&#x987B;&#x540C;&#x65F6;&#x8986;&#x76D6;hashCode()&#x65B9;&#x6CD5;&#xFF0C;&#x4EE5;&#x786E;&#x4FDD;&#x53EF;&#x4EE5;&#x5728;&#x57FA;&#x4E8E;&#x54C8;&#x5E0C;&#x7684;&#x96C6;&#x5408;&#x4E2D;&#x4F7F;&#x7528;&#x4F60;&#x7684;&#x7C7B;&#x3002;--&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>EqualsHashCode<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>module</span><span class="token punctuation">&gt;</span></span>
        <span class="token comment">&lt;!-- &#x68C0;&#x67E5;&#x5B57;&#x7B26;&#x4E32;&#x5BF9;&#x8C61;&#x7684;&#x6BD4;&#x8F83;&#x662F;&#x5426;&#x4F7F;&#x7528;&#x4E86;==&#x6216;!=&#x8FD0;&#x7B97;&#x7B26;&#x3002; --&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>StringLiteralEquality<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>module</span><span class="token punctuation">&gt;</span></span>

        <span class="token comment">&lt;!-- &#x68C0;&#x67E5;&#x7A7A;&#x7684;try&#x5757; , &#x81F3;&#x5C11;&#x8981;&#x6709;log&#x8F93;&#x51FA; .  &#x7A7A;&#x7684;try, &#x4F1A;&#x589E;&#x52A0;&#x6392;&#x67E5;&#x95EE;&#x9898;&#x7684;&#x96BE;&#x5EA6;--&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>EmptyCatchBlock<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>module</span><span class="token punctuation">&gt;</span></span>

        <span class="token comment">&lt;!-- for &#x5D4C;&#x5957;&#x7684;&#x6700;&#x5927;&#x6DF1;&#x5EA6;,&#x6700;&#x5927;&#x4E24;&#x5C42;, &#x5927;&#x4E8E;&#x4E24;&#x5C42;&#x8981;&#x62C6;&#x5206;--&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>NestedForDepth<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>max<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>1<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>module</span><span class="token punctuation">&gt;</span></span>


        <span class="token comment">&lt;!-- ==============  &#x2193;  WARN(default)  &#x2193; ======================--&gt;</span>


        <span class="token comment">&lt;!--
          &#x68C0;&#x67E5;switch&#x8BED;&#x53E5;&#x662F;&#x5426;&#x542B;&#x6709;default&#x5B50;&#x53E5;&#x3002;
          &#x89E3;&#x91CA;&#xFF1A;&#x5728;&#x6BCF;&#x4E2A;switch&#x8BED;&#x53E5;&#x4E2D;&#x5F15;&#x5165;&#x4E00;&#x6761;&#x9ED8;&#x8BA4;&#x5206;&#x652F;&#x901A;&#x5E38;&#x662F;&#x4E00;&#x4E2A;&#x5F88;&#x597D;&#x7684;&#x4E3B;&#x610F;&#x3002;&#x5373;&#x4F7F;&#x5F00;&#x53D1;&#x8005;&#x786E;&#x4FE1;&#x6240;&#x6709;&#x5F53;&#x524D;&#x53EF;&#x80FD;&#x7684;&#x5206;&#x652F;&#x90FD;&#x80FD;&#x8986;&#x76D6;&#x5230;&#xFF0C;&#x8FD9;&#x4E5F;&#x5E94;&#x5F53;&#x5728;default&#x5206;&#x652F;&#x4E2D;&#x8868;&#x8FBE;&#x51FA;&#x6765;&#xFF0C;&#x4F8B;&#x5982;&#xFF0C;&#x4F7F;&#x7528;&#x4E00;&#x6761;&#x65AD;&#x8A00;&#x3002;&#x8FD9;&#x79CD;&#x65B9;&#x6CD5;&#x4F7F;&#x5F97;&#x4EE3;&#x7801;&#x53EF;&#x4EE5;&#x5E94;&#x4ED8;&#x4EE5;&#x540E;&#x7684;&#x4FEE;&#x6539;&#xFF0C;&#x4F8B;&#x5982;&#xFF0C;&#x5728;&#x4E00;&#x4E2A;&#x679A;&#x4E3E;&#x7C7B;&#x578B;&#x4E2D;&#x5F15;&#x5165;&#x65B0;&#x7684;&#x7C7B;&#x578B;&#x3002;--&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>MissingSwitchDefault<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
        <span class="token comment">&lt;!-- &#x68C0;&#x67E5;&#x662F;&#x5426;&#x6709;&#x8FC7;&#x4E8E;&#x590D;&#x6742;&#x7684;&#x5E03;&#x5C14;&#x8868;&#x8FBE;&#x5F0F;&#x3002;&#x73B0;&#x5728;&#x80FD;&#x591F;&#x53D1;&#x73B0;&#x8BF8;&#x5982;if (b == true)&#x3001;b || true&#x3001;!false&#x7B49;&#x7C7B;&#x578B;&#x7684;&#x4EE3;&#x7801;&#x3002;
              &#x89E3;&#x91CA;&#xFF1A;&#x590D;&#x6742;&#x7684;&#x5E03;&#x5C14;&#x903B;&#x8F91;&#x4F1A;&#x4F7F;&#x5F97;&#x4EE3;&#x7801;&#x96BE;&#x4EE5;&#x7406;&#x89E3;&#x548C;&#x7EF4;&#x62A4;&#x3002;--&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>SimplifyBooleanExpression<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
        <span class="token comment">&lt;!-- &#x68C0;&#x67E5;&#x7C7B;&#x6216;&#x5BF9;&#x8C61;&#x7684;&#x6210;&#x5458;&#x662F;&#x5426;&#x663E;&#x5F0F;&#x5730;&#x521D;&#x59CB;&#x5316;&#x4E3A;&#x6210;&#x5458;&#x6240;&#x5C5E;&#x7C7B;&#x578B;&#x7684;&#x9ED8;&#x8BA4;&#x503C;&#xFF08;&#x5BF9;&#x8C61;&#x5F15;&#x7528;&#x7684;&#x9ED8;&#x8BA4;&#x503C;&#x4E3A;null&#xFF0C;&#x6570;&#x503C;&#x548C;&#x5B57;&#x7B26;&#x7C7B;&#x578B;&#x7684;&#x9ED8;&#x8BA4;&#x503C;&#x4E3A;0&#xFF0C;&#x5E03;&#x5C14;&#x7C7B;&#x578B;&#x7684;&#x9ED8;&#x8BA4;&#x503C;&#x4E3A;false&#xFF09;&#x3002;
              &#x89E3;&#x91CA;&#xFF1A;&#x6BCF;&#x4E2A;&#x5B9E;&#x4F8B;&#x53D8;&#x91CF;&#x90FD;&#x4F1A;&#x88AB;&#x521D;&#x59CB;&#x5316;&#x4E24;&#x6B21;&#xFF0C;&#x5E76;&#x4E14;&#x521D;&#x59CB;&#x5316;&#x4E3A;&#x76F8;&#x540C;&#x7684;&#x503C;&#x3002;&#x5728;&#x6267;&#x884C;&#x4EE3;&#x7801;&#x4E2D;&#x6307;&#x5B9A;&#x7684;&#x4EFB;&#x4F55;&#x521D;&#x59CB;&#x5316;&#x64CD;&#x4F5C;&#x4E4B;&#x524D;&#xFF0C;Java&#x4F1A;&#x521D;&#x59CB;&#x5316;&#x6BCF;&#x4E2A;&#x5B9E;&#x4F8B;&#x53D8;&#x91CF;&#x4E3A;&#x5B83;&#x7684;&#x9ED8;&#x8BA4;&#x503C;&#xFF08;0&#x6216;null&#xFF09;&#x3002;&#x56E0;&#x6B64;&#x5728;&#x8FD9;&#x79CD;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;x&#x4F1A;&#x88AB;&#x521D;&#x59CB;&#x5316;&#x4E3A;0&#x4E24;&#x6B21;&#xFF0C;bar&#x4F1A;&#x88AB;&#x521D;&#x59CB;&#x5316;&#x4E3A;null&#x4E24;&#x6B21;&#x3002;&#x56E0;&#x6B64;&#xFF0C;&#x8FD9;&#x6837;&#x7A0D;&#x5FAE;&#x6709;&#x4E9B;&#x6548;&#x7387;&#x4F4E;&#x4E0B;&#x3002;&#x8FD9;&#x79CD;&#x7F16;&#x7801;&#x98CE;&#x683C;&#x662F;C/C++&#x7F16;&#x7801;&#x98CE;&#x683C;&#x7684;&#x5EF6;&#x7EED;&#xFF0C;&#x5B83;&#x8868;&#x660E;&#x5F00;&#x53D1;&#x8005;&#x5E76;&#x4E0D;&#x662F;&#x771F;&#x6B63;&#x6709;&#x628A;&#x63E1;Java&#x80FD;&#x591F;&#x521D;&#x59CB;&#x5316;&#x5B9E;&#x4F8B;&#x53D8;&#x91CF;&#x4E3A;&#x5B83;&#x7684;&#x9ED8;&#x8BA4;&#x503C;&#x3002;--&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>ExplicitInitialization<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>

        <span class="token comment">&lt;!-- &#x68C0;&#x67E5;&#x4E00;&#x4E2A;&#x65B9;&#x6CD5;&#x6216;&#x6784;&#x9020;&#x5668;&#x7684;&#x53C2;&#x6570;&#x7684;&#x6570;&#x91CF;&#x3002; &#x9ED8;&#x8BA4;10--&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>ParameterNumber<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>max<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>10<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>ignoreOverriddenMethods<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>true<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>tokens<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>METHOD_DEF<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>module</span><span class="token punctuation">&gt;</span></span>

        <span class="token comment">&lt;!-- &#x6570;&#x7EC4;&#x7C7B;&#x578B;&#x98CE;&#x683C; Java&#x98CE;&#x683C;&#xFF1A;public static void main(String[] args)--&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>ArrayTypeStyle<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
        <span class="token comment">&lt;!-- &#x68C0;&#x67E5;long&#x7C7B;&#x578B;&#x7684;&#x5E38;&#x91CF;&#x5728;&#x5B9A;&#x4E49;&#x65F6;&#x662F;&#x5426;&#x7531;&#x5927;&#x5199;&#x7684;&#x201C;L&#x201D;&#x5F00;&#x5934; --&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>UpperEll<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
        <span class="token comment">&lt;!-- if &#x5D4C;&#x5957;&#x7684;&#x6700;&#x5927;&#x6DF1;&#x5EA6;,&#x5927;&#x4E8E; 2 &#x4E2A;&#x544A;&#x8B66; --&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>NestedIfDepth<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>max<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>1<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>module</span><span class="token punctuation">&gt;</span></span>

        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>RegexpSinglelineJava<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>format<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>RequestMapping.*/api/ipapi<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>message<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>&#x7981;&#x7528; &apos;/api/ipapi&apos;&#x505A;&#x4E3A;&#x63A5;&#x53E3;&#x8DEF;&#x5F84;,&#x8FD9;&#x662F;&#x5386;&#x53F2;&#x8DEF;&#x5F84;,&#x4E0D;&#x518D;&#x517C;&#x5BB9; <span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>ignoreComments<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>true<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>module</span><span class="token punctuation">&gt;</span></span>
        <span class="token comment">&lt;!-- &#x68C0;&#x67E5;&#x662F;&#x5426;&#x5BFC;&#x5165;&#x4E86;&#x6307;&#x5B9A;&#x7684;&#x975E;&#x6CD5;&#x5305;&#x3002;&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x8FD9;&#x9879;&#x68C0;&#x67E5;&#x4F1A;&#x62D2;&#x7EDD;&#x6240;&#x6709;&#x7684;sun.*&#x5305;&#xFF0C;&#x56E0;&#x4E3A;&#x76F4;&#x63A5;&#x4F7F;&#x7528;sun.*&#x5305;&#x7684;&#x7A0B;&#x5E8F;&#x80AF;&#x5B9A;&#x4E0D;&#x662F;100%&#x7684;&#x7EAF;Java&#x7A0B;&#x5E8F;&#x3002;&#x60F3;&#x8981;&#x62D2;&#x7EDD;&#x5176;&#x4ED6;&#x7684;&#x5305;&#xFF0C;&#x5C06;illegalPkgs&#x5C5E;&#x6027;&#x8BBE;&#x7F6E;&#x4E3A;&#x4F60;&#x6307;&#x5B9A;&#x7684;&#x975E;&#x6CD5;&#x5305;&#x5217;&#x8868;&#x5373;&#x53EF;&#x3002;--&gt;</span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>IllegalImport<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token comment">&lt;!--&#x4E0D;&#x8981;&#x76F4;&#x63A5;&#x4F7F;&#x7528;device&#x5305;&#x7684;dao&#x63A5;&#x53E3;, &#x547C;&#x53EB;&#x6B63;&#x5728;&#x9010;&#x6B65;&#x53BB;&#x6389;device&#x4F9D;&#x8D56;--&gt;</span>
            <span class="token comment">&lt;!--&#x591A;&#x4E2A;&#x5305;&#x8DEF;&#x5F84;&#x7528;&#x9017;&#x53F7;&#x5206;&#x9694; ,&#x4F8B;&#x5982;:java.io, java.sql--&gt;</span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>illegalPkgs<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>com.device.dao<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span>
            <span class="token comment">&lt;!--Apache BeanUtils&#x6027;&#x80FD;&#x8F83;&#x5DEE;,&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x5176;&#x4ED6;&#x65B9;&#x6848;:&#x6BD4;&#x5982;Spring BeanUtils , Cglib BeanCopier--&gt;</span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>illegalClasses<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>org.apache.commons.beanutils.BeanUtils<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>module</span><span class="token punctuation">&gt;</span></span>


        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>module</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>RegexpSinglelineJava<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>property</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>format<span class="token punctuation">&quot;</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>printStackTrace<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>module</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>module</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>module</span><span class="token punctuation">&gt;</span></span>
</code></pre><h2 id="pre-commit"><a name="pre-commit" class="anchor-navigation-ex-anchor" href="#pre-commit"><i class="fa fa-link" aria-hidden="true"></i></a>pre-commit</h2>
<pre class="language-"><code>#!/bin/bash
## cp ./checkstyle/pre-commit ./.git/hooks/

# &#x4E00;&#x4E2A;&#x6253;&#x5370;&#x51FD;&#x6570;
function print(){
    echo &quot;&gt; $*&quot;
}

print &#x63D0;&#x4EA4;&#x4EE3;&#x7801;&#x8BF7;&#x786E;&#x4FDD;&#x5DF2;&#x7ECF;&#x7F16;&#x8BD1;&#x901A;&#x8FC7;

wd=`pwd`
print &quot;&#x5F53;&#x524D;&#x5DE5;&#x4F5C;&#x76EE;&#x5F55;&#xFF1A;$wd&quot;

check_jar_path=&quot;$wd/checkstyle/checkstyle-8.27-all.jar&quot;
check_xml_path=&quot;$wd/checkstyle/checkstyle.xml&quot;
error_output_path=&quot;$wd/checkstyle/checkstyle_output.txt&quot;


# &#x6E05;&#x7A7A;temp&#x6587;&#x4EF6;
rm -f $error_output_path

for file in `git status --porcelain | sed s/^...// | grep &apos;\.java$&apos;`;do
    path=&quot;$wd/$file&quot;
    print &quot;&#x68C0;&#x67E5;&#x6587;&#x4EF6;&#xFF1A;$path&quot;
    re=`java -jar $check_jar_path -c $check_xml_path $path &gt;&gt; $error_output_path`
done

err=0

if [ -f &quot;$error_output_path&quot; ];then

    err=`cat $error_output_path | grep -o &quot;\[ERROR\]&quot;  | wc -l`
    warn=`cat $error_output_path | grep -o &quot;\[WARN\]&quot;  | wc -l`
    print &quot;&quot;
    print &quot;&#x9519;&#x8BEF;&#x6570;: $err, &#x8B66;&#x544A;&#x6570;: $warn&quot;
    print &quot;&quot;
fi

if [ $err -ne 0 ];then
    print &quot;[Error]&#x4E0D;&#x53EF;&#x63D0;&#x4EA4;,&#x5177;&#x4F53;&#x5185;&#x5BB9;&#x89C1;:checkstyle/checkstyle_output.txt&quot;
    exit 1
else
    print &quot;&#x68C0;&#x67E5;&#x7ED3;&#x675F; , Good Luck !&quot;
fi


exit 0
</code></pre><footer class="page-footer"><span class="copyright">Copyright &#xA9; jisong.fun  all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2020-01-06 11:13:28
</span></footer> <link rel="stylesheet" type="text/css" href="https://storage.googleapis.com/app.klipse.tech/css/codemirror.css"> <script>     window.klipse_settings = {         selector: ".language-klipse, .lang-eval-clojure",         selector_eval_js: ".lang-eval-js",         selector_eval_python_client: ".lang-eval-python",         selector_eval_php: ".lang-eval-php",         selector_eval_scheme: ".lang-eval-scheme",         selector_eval_ruby: ".lang-eval-ruby",         selector_reagent: ".lang-reagent",        selector_google_charts: ".lang-google-chart",        selector_es2017: ".lang-eval-es2017",        selector_jsx: ".lang-eval-jsx",        selector_transpile_jsx: ".lang-transpile-jsx",        selector_render_jsx: ".lang-render-jsx",        selector_react: ".lang-react",        selector_eval_markdown: ".lang-render-markdown",        selector_eval_lambdaway: ".lang-render-lambdaway",        selector_eval_cpp: ".lang-eval-cpp",        selector_eval_html: ".lang-render-html",        selector_sql: ".lang-eval-sql",        selector_brainfuck: "lang-eval-brainfuck",        selector_js: ".lang-transpile-cljs"    }; </script> <script src="https://storage.googleapis.com/app.klipse.tech/plugin/js/klipse_plugin.js"></script>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="checkstyle.xml.html" class="navigation navigation-prev " aria-label="Previous page: checkstyle.xml">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="pre-commit.html" class="navigation navigation-next " aria-label="Next page: pre-commit">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"githook使用checkstyle","level":"4.2.2","depth":2,"next":{"title":"pre-commit","level":"4.2.3","depth":2,"path":"TOOLS/checkstyle/pre-commit.md","ref":"TOOLS/checkstyle/pre-commit.md","articles":[]},"previous":{"title":"checkstyle.xml","level":"4.2.1","depth":2,"path":"TOOLS/checkstyle/checkstyle.xml.md","ref":"TOOLS/checkstyle/checkstyle.xml.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-lunr","-search","-highlight","-livereload","search-plus@^0.0.11","simple-page-toc@^0.1.1","-github@^2.0.0","-github-buttons@2.1.0","-edit-link@^2.0.2","-disqus@^0.1.0","prism@^2.1.0","prism-themes@^0.0.2","advanced-emoji@^0.2.1","anchors@^0.7.1","include-codeblock@^3.0.2","ace@^0.3.2","emphasize@^1.1.0","-katex@^1.1.3","splitter@^0.0.8","mermaid-gb3@2.1.0","tbfed-pagefooter@^0.0.1","expandable-chapters-small@^0.1.7","sectionx@^3.1.0","-donate@^1.0.2","-local-video@^1.0.1","-sitemap-general@^0.1.1","anchor-navigation-ex@0.1.8","favicon@^0.0.2","todo@^0.1.3","3-ba@^0.9.0","-terminal@^0.3.2","-alerts@^0.2.0","include-csv@^0.1.0","puml@^1.0.1","musicxml@^1.0.2","klipse@^1.2.0","-versions-select@^0.1.1","-rss@^3.0.2","-sharing","sharing-plus@^0.0.2","graph@^0.1.0","chart@^0.2.0","summary"],"root":".","styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright © jisong.fun ","modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"prism":{"css":["prism-themes/themes/prism-base16-ateliersulphurpool.light.css"]},"include-csv":{},"disqus":{"shortName":"note-book"},"emphasize":{},"ace":{},"github":{"url":"https://gitee.com/ji-song/note-book"},"puml":{},"simple-page-toc":{"maxDepth":3,"skipFirstH1":true},"todo":{},"summary":{"excludeDir":["assets","styles","**/assets","resources"],"readme":"0-README.md","introduction":{"title":"继松的笔记","file":"README.md"}},"splitter":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"graph":{},"donate":{"wechat":"https://ji-song.com/resource/weixin.png","alipay":"https://ji-song.com/resource/alipay.png","title":"","button":"赏","alipayText":"支付宝打赏","wechatText":"微信打赏"},"sitemap-general":{"prefix":"http://gitbook.ji-song.com"},"fontsettings":{"theme":"white","family":"sans","size":2},"rss":{"title":"继松的书","description":"记录点滴","author":"JiSong Sun","feed_url":"http://gitbook.ji-song.com/rss","site_url":"http://gitbook.ji-song.com/","managingEditor":"me@ji-song.com","webMaster":"me@ji-song.com","categories":["gitbook"]},"musicxml":{},"sectionx":{"tag":"b"},"mermaid-gb3":{},"anchor-navigation-ex":{"isRewritePageTitle":false,"tocLevel1Icon":"fa fa-hand-o-right","tocLevel2Icon":"fa fa-hand-o-right","tocLevel3Icon":"fa fa-hand-o-right"},"favicon":{"shortcut":"favicon.ico","bookmark":"favicon.ico"},"prism-themes":{},"github-buttons":{"repo":"ji-song/note-book","types":["star"],"size":"small"},"3-ba":{"configuration":"auto","token":"ff100361cdce95dd4c8fb96b4009f7bc"},"expandable-chapters-small":{},"klipse":{"myConfigKey":"it's the default value"},"versions":{"options":[{"value":"http://gitbook.ji-song.com","text":"v3.2.3"},{"value":"http://gitbook.ji-song.com/v2/","text":"v2.6.4"}]},"advanced-emoji":{"embedEmojis":false},"include-codeblock":{"check":false,"edit":true,"fixlang":false,"lang":"","template":"ace","theme":"chrome","unindent":true},"sharing":{"qq":false,"all":["facebook","google","twitter","weibo","instapaper","linkedin","pocket","stumbleupon","qq","qzone"],"douban":false,"facebook":false,"weibo":true,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":false,"messenger":false,"line":false,"vk":false,"pocket":false,"google":true,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":true},"terminal":{"copyButtons":true,"fade":false,"style":"flat"},"edit-link":{"base":"https://github.com/ji-song/gitbook-use/edit/master","label":"Edit This Page"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":true},"anchors":{},"chart":{"type":"c3"},"search-plus":{}},"theme":"default","author":"jisong","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"继松的书","language":"zh-hans","output.name":"site","links":{"sidebar":{"Home":"http://ji-song.gitee.io/cc"}},"gitbook":"3.2.3","description":"记录点滴"},"file":{"path":"TOOLS/checkstyle/githook使用checkstyle.md","mtime":"2020-01-06T03:13:28.852Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-04-14T08:13:26.502Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-ace/ace/ace.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-ace/ace.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-mermaid-gb3/book/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sectionx/sectionx.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-3-ba/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-musicxml/osmd.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-musicxml/musicxml.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-musicxml/promise.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    <script src="../../gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.min.js"></script>

    </body>
</html>

